Communication Device, Non-Transitory Computer-Readable Recording Medium Storing Computer-Readable Instructions For Communication Device, And Method Executed By Communication Device

ABSTRACT

A communication device may shift an operation state of the communication device from a specific state to a G/O state in a case where a first wireless connection via a first wireless interface is established with a first external device under a situation where the operation state of the communication device is the specific state and predetermined information is received from the first external device using the first wireless connection, and after the operation state of the communication device has shifted to the G/O state in response to receiving the predetermined information from the first external device, establish a second wireless connection via a second wireless interface with the first external device so as to cause the first external device to participate as a client in a first wireless network in which the communication device operates as a G/O.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of U.S. patent application Ser. No.15/923,187 filed Mar. 16, 2018, which claims priority to Japanese PatentApplication No. 2017-071007, filed on Mar. 31, 2017, the contents ofwhich are hereby incorporated by reference into the present application.

TECHNICAL FIELD

The present disclosure discloses a communication device configured to becapable of shifting to a G/O (abbreviation of Group Owner) state of aWFD (abbreviation of Wi-Fi Direct (registered trademark)) scheme.

BACKGROUND ART

A communication system provided with a printer and a mobile terminal isknown. When an NFC (abbreviation of Near Field Communication) link isestablished with the mobile terminal, the printer sends wireless settinginformation (such as an SSID (abbreviation of Service Set Identifier), apassword, etc.), which is to be used in a WFD network, to the mobileterminal in response to receiving a read command from the mobileterminal. Upon sending the wireless setting information, the printershifts to a G/O state of a WFD scheme to create a WFD network. Then, theprinter establishes a wireless connection with the mobile terminal byusing the wireless setting information, and causes the mobile terminalto participate in the WFD network as a client of the WFD scheme.

SUMMARY

In the above configuration, the printer shifts to the G/O state inresponse to receiving the read command and sending the wireless settinginformation to the mobile terminal. However, if preparation to establishthe wireless connection with the printer is not completed in the mobileterminal, the printer cannot establish the wireless connection with themobile terminal. In this case, the process of the printer shifting tothe G/O state is wasted.

The disclosure herein discloses a technique for suppressing a processingload on a communication device from increasing.

A communication device disclosed herein may comprise a first wirelessinterface configured to execute a wireless communication with anotherdevice located at a first distance; a second wireless interfaceconfigured to execute a wireless communication according to a Wi-Fischeme with another device located at a second distance, the seconddistance being greater than the first distance; a processor; and amemory storing computer-readable instructions therein, thecomputer-readable instructions, when executed by the processor, causingthe communication device to: shift an operation state of thecommunication device from a specific state to a G/O (abbreviation ofGroup Owner) state of a WFD (abbreviation of Wi-Fi Direct (registeredtrademark)) scheme conforming to the Wi-Fi scheme, in a case where afirst wireless connection via the first wireless interface isestablished with a first external device under a situation where theoperation state of the communication device is the specific state, andpredetermined information is received from the first external deviceusing the first wireless connection, the specific state being differentfrom the G/O state, the predetermined information being information thatis sent from a device that has installed an application program forestablishing a wireless connection via the second wireless interfacewith the communication device, wherein the operation state of thecommunication device is not shifted to the G/O state in a case where thefirst wireless connection is established with the first external deviceand the predetermined information is not received from the firstexternal device using the first wireless connection; and after theoperation state of the communication device has shifted to the G/O statein response to receiving the predetermined information from the firstexternal device, establish a second wireless connection via the secondwireless interface with the first external device so as to cause thefirst external device to participate as a client of the WFD scheme in afirst wireless network in which the communication device operates as aG/O.

A control method for implementation of the aforementioned communicationdevice, the aforementioned computer-readable instructions, and anon-transitory computer-readable recording medium storing thecomputer-readable instructions are also novel and useful. Further, acommunication system which comprises the aforementioned communicationdevice and an external device is also novel and useful.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a configuration of a communication system.

FIG. 2 shows a flow chart of processing to be executed by an MFP.

FIG. 3 shows a flow chart of device processing.

FIG. 4 shows a flow chart of automated G/O processing.

FIG. 5 shows a sequence diagram of a case A where an NFC connection isestablished in a state where a WFD function is OFF.

FIG. 6 shows a sequence diagram of a case B where an NFC connection isestablished in a state where the WFD function is ON.

FIG. 7 shows a sequence diagram of a case C where a Legacy connection isestablished.

FIG. 8 shows a sequence diagram of a case D where an inquiry screen isdisplayed.

FIG. 9 shows a sequence diagram of a comparative example.

EMBODIMENTS

(Configuration of Communication System 2; FIG. 1)

As shown in FIG. 1, a communication system 2 comprises a multi-functionperipheral (hereafter termed “MFP”) 10 and a plurality of mobileterminals 100, 200, 300. Each of the devices 10, 100, 200, 300 iscapable of executing a wireless communication according to a Wi-Fischeme (hereafter termed “Wi-Fi communication”) and a wirelesscommunication according to an NFC (abbreviation of Near FieldCommunication) scheme (hereafter termed “NFC communication”). The MFP 10and each of the mobile terminals 100, 300 are WFD devices capable ofexecuting (i.e., supporting) a wireless communication according to a WFD(abbreviation of Wi-Fi Direct (registered trademark)) scheme conformingto the Wi-Fi scheme (hereafter termed “WFD communication”). The mobileterminal 200 is a Legacy device which is not capable of executing (i.e.,does not support) the WFD communication.

(Configuration of MFP 10)

The MFP 10 is a peripheral device (such as a peripheral device for themobile terminal 100) capable of executing multiple functions including aprint function and a scan function. The MFP 10 comprises an operationunit 12, a display unit 14, a print executing unit 16, a scan executingunit 18, a Wi-Fi interface 20, an NFC interface 22, and a controller 30.The respective units 12 to 30 are connected via a bus line (referencesign thereof is omitted). Hereafter, an interface will be denoted as“I/F”.

The operation unit 12 includes a plurality of keys, and accepts useroperations. The display unit 14 is a display for displaying varioustypes of information. The print executing unit 16 includes a printingmechanism of an ink jet type, a laser type, or the like. The scanexecuting unit 18 is a scanning mechanism such as a CCD or a CIS.

The Wi-Fi I/F 20 is a wireless interface for executing a Wi-Ficommunication according to the Wi-Fi scheme. The Wi-Fi I/F 20 isallocated with a MAC address “A”. The Wi-Fi scheme is a wirelesscommunication scheme for executing a wireless communication accordingto, for example, the 802.11 standard of the IEEE (abbreviation of theInstitute of Electrical and Electronics Engineers, Inc.), and otherstandards complying therewith (such as 802.11a, 11b, 11g, 11n, etc.).The Wi-Fi I/F 20 especially supports the WFD scheme defined by the Wi-FiAlliance, and is capable of executing a wireless communication accordingto the WFD scheme. That is, the MFP 10 is a WFD device. The WFD schemeis a wireless communication scheme described in the specification “Wi-FiPeer-to-Peer (P2P) Technical Specification Version 1.1” created by theWi-Fi Alliance. In the WFD specification, three states, namely a GroupOwner state (hereafter termed “G/O state”), a client state, and a devicestate, are defined as states of a WFD device. A WFD device can operateselectively in any one of the aforementioned three states.

Further, the Wi-Fi I/F 20 supports a WPS (abbreviation of Wi-FiProtected Setup) defined by the Wi-Fi Alliance. The WPS is a so-calledautomated wireless setting or an easy wireless setting, and it is atechnique that is capable of establishing a wireless connection easilybetween a pair of devices even if wireless setting information (such asa password, authentication scheme, encryption scheme, etc.) forestablishing the wireless connection according to the Wi-Fi scheme isnot inputted by a user. Especially, the Wi-Fi I/F 20 supports a PBC(abbreviation of Push Button Configuration) scheme of the WPS. The PBCscheme is a scheme for establishing a wireless connection between a pairof devices in a case where a predetermined operation (such as anoperation to press a button) is performed by the user on each of thepair of devices.

The NFC I/F 22 is an I/F for executing an NFC communication according tothe NFC scheme. The NFC scheme is a wireless communication scheme basedon, for example, the international standards such as ISO/IEC 14443,15693, 18092, and the like. An I/F called an NFC forum device and an I/Fcalled an NFC forum tag are known as types of I/Fs for executing the NFCcommunication. The NFC I/F 22 is an NFC forum device, and is an I/Fcapable of selectively operating in any one of a P2P (abbreviation ofPeer To Peer) mode, an R/W (abbreviation of Reader/Writer) mode, and aCE (abbreviation of Card Emulation) mode. The present embodiment isexplained by assuming that the NFC I/F 22 is to operate in the CE mode.

Here, differences between the Wi-Fi communication and the NFCcommunication will be described. A communication speed of the Wi-Ficommunication (of which maximum communication speed is 11 to 600 Mbps,for example) is faster than a communication speed of the NFCcommunication (of which maximum communication speed is 100 to 424 Kbps,for example). Further, a carrier frequency of the Wi-Fi communication(which is either 2.4 GHz band or 5.0 GHz band, for example) differs froma carrier frequency of the NFC communication (which is 13.56 MHz band,for example). Further, a maximum distance with which the Wi-Ficommunication can be executed (which is about 100 m at maximum) isgreater than a maximum distance with which the NFC communication can beexecuted (which is about 10 cm at maximum).

The controller 30 includes a CPU 32 and a memory 34. The CPU 32 isconfigured to execute various types of processes according to a program36 stored in the memory 34. The memory 34 is constituted of a volatilememory, a nonvolatile memory, and the like. Further, the memory 34stores a WFD function flag 38 which indicates whether or not the MFP 10is capable of executing an operation according to the WFD scheme. TheWFD function flag 38 is set to a value which is one of “ON” meaning thatthe MFP 10 is capable of executing an operation according to the WFDscheme, and “OFF” meaning that the MFP 10 is incapable of executing thatoperation.

(Configuration of Mobile Terminal 100)

The mobile terminal 100 is a carriable terminal device such as a cellphone, a smart phone, a PDA, a laptop PC, a tablet PC, a portable musicplayer, a portable movie player, or the like. The mobile terminal 100includes an operation unit 112, a display unit 114, a Wi-Fi I/F 120, anNFC I/F 122, and a controller 130. The respective units 112 to 130 areconnected via a bus line (reference sign thereof is omitted).

The operation unit 112 includes a plurality of keys. The user can inputvarious instructions to the mobile terminal 100 by operating theoperation unit 112. The display unit 114 is a display for displayingvarious types of information. The display unit 114 also functions as aso-called touch panel. That is, the display unit 114 functions also asan operation unit.

The Wi-Fi I/F 120 is similar to the Wi-Fi I/F 20, and supports the WFDscheme. That is, the mobile terminal 100 is a WFD device. Further, theNFC I/F 122 is similar to the NFC I/F 22, except for an assumption thatthe NFC I/F 122 is to operate in the R/W mode.

The controller 130 includes a CPU 132 and a memory 134. The CPU 132executes various processes according to an OS (abbreviation of OperatingSystem) program 136 stored in the memory 134. The memory 134 isconstituted of a volatile memory, nonvolatile memory, and the like. TheOS program 136 is a program for realizing basic operations of the mobileterminal 100. The memory 134 further stores an MFP application(hereafter termed “MFP app”) 140. The MFP app 140 is an application forcausing the MFP 10 to execute various functions. The MFP app 140 may beinstalled to the mobile terminal 100, for example, from a server on theInternet provided by a vendor of the MFP 10, or may be installed to themobile terminal 100 from a medium shipped with the MFP 10.

(Configurations of Other Mobile Terminals 200, 300)

The mobile terminal 200 includes almost the same configuration as thatof the mobile terminal 100. However, a Wi-Fi I/F of the mobile terminal200 does not support the WFD scheme. That is, the mobile terminal 200 isa Legacy device. Further, the mobile terminal 300 includes almost thesame configuration as that of the mobile terminal 100. However, a memoryof the mobile terminal 300 does not store the MFP app 140.

(Processing Executed by MFP 10: FIG. 2)

Next, processing executed by the CPU 32 of the MFP 10 will be describedwith reference to FIG. 2. This processing is executed in a state wherethe WFD function flag 38 is set to “OFF”.

In S5, the CPU 32 monitors whether a WFD enabling operation is executedon the operation unit 12. The WFD enabling operation is an operation forchanging the WFD function flag 38 from “OFF” to “ON”. In a case wherethe WFD enabling operation is executed (YES in S5), the CPU 32 proceedsto S10.

In S10, the CPU 32 changes the WFD function flag 38 from “OFF” to “ON”.Then, in S15, the CPU 32 supplies an LS (abbreviation of Listen Search)starting instruction for starting a Listen process and a Search processto the Wi-Fi I/F 20. The LS starting instruction includes an instructionfor setting a duration of the Listen process and a duration of theSearch process. Here, each of the duration of the Listen process and theduration of the Search process is set to a value greater than zero. Dueto this, the Wi-Fi I/F 20 executes the Listen process over the durationthereof and then executes the Search process over the duration thereofrepeatedly, according to the instruction included in the LS startinginstruction. That is, the Wi-Fi I/F 20 repeats executing the Listenprocess and the Search process, alternately. Due to this, an operationstate of the MFP 10 shifts to the device state of the WFD scheme, thatis, a state in which the MFP 10 executes an operation according to theWFD scheme. The Listen process is a process of sending a Probe responsein response to receiving a Probe request. Further, the Search process isa process of monitoring receipt of a Probe response in response tosending a Probe request.

In S20, the CPU 32 executes device processing (see FIG. 3). The deviceprocessing is processing executed during when the operation state of theMFP 10 is the device state.

Further, in S45, the CPU 32 monitors whether a wireless connection(hereafter termed “NFC connection”) is established between the NFC I/F22 and an NFC I/F (e.g., 122) of a mobile terminal (e.g., 100). In acase of acquiring information that indicates an NFC connection has beenestablished from the NFC I/F 22, the CPU 32 determines YES in S45 andproceeds to S50. Hereafter, the mobile terminal with which the NFCconnection has been established will be termed “target mobile terminal”.

As aforementioned, the present embodiment is explained by assuming thecase where the NFC I/F 22 of the MFP 10 operates in the CE mode, and theNFC I/F of the target mobile terminal operates in the R/W mode. Thus,the target mobile terminal can send, to the MFP 10, a Read commandaccording to a Reader mode of the R/W mode and a Write command accordingto a Writer mode of the R/W mode. The Read command is a command forrequesting the MFP 10 to read out information (that is, to send Readinformation to the target mobile terminal). The Write command is acommand for requesting the MFP 10 to write information (that is, toreceive Write information from the target mobile terminal). In S50, theCPU 32 sends Read information to the target mobile terminal in responseto receiving a Read command from the target mobile terminal using theNFC connection established in S45. The Read information includes the MACaddress “A” of the MFP 10, and wireless setting information to be usedin a wireless network (hereafter termed “WFD network”) in which the MFP10 operates as the G/O. The wireless setting information includes anSSID (abbreviation of Service Set Identifier) which is an identifier foridentifying the WFD network, and a password which is used forauthentication and encryption in the WFD network.

The aforementioned wireless setting information is generated accordingto the below procedure. Upon when a power of the MFP 10 is turned on,the CPU 32 generates wireless setting information and stores it in thememory 34. Then, the CPU 32 forms a WFD network in which the wirelesssetting information is to be used in a case where the MFP 10 operates asthe G/O in S180 of FIG. 3 to be described later, or in a case whereprocessing of FIG. 4 is executed. After this, the CPU 32 generates newwireless setting information upon when the current WFD network vanishes,and stores the new wireless setting information instead of the oldwireless setting information in the memory 34. Due to this, in S180 ofFIG. 3 or in the processing of FIG. 4, the CPU 32 forms a WFD network inwhich the new wireless setting information is to be used. As such, priorto forming a WFD network, the CPU 32 generates wireless settinginformation to be used in this WFD network, and sends the Readinformation including this wireless setting information to the targetmobile terminal in S50 of FIG. 2. It should be noted that in a variant,the CPU 32 may generate wireless setting information each time a WFDnetwork is formed, and may delete the wireless setting information fromthe memory 34 when the WFD network vanishes.

In S55, the CPU 32 monitors whether Write information is received fromthe target mobile terminal using the NFC connection established in S45.The Write information is information to be sent from a device in whichthe MFP app 140 has already been installed, and includes a G/O shiftinginstruction for shifting the operation state of the MFP 10 to the G/Ostate. In a case where the target mobile terminal is a WFD device, theWrite information further includes PBC information. The PBC informationis information indicating that the target mobile terminal supports thePBC scheme. On the other hand, in a case where the target mobileterminal is a Legacy device, the Write information does not include thePBC information. In a case where the Write information is received fromthe target mobile terminal (YES in S55), the CPU 32 proceeds to S57, orin a case where the Write information is not received from the targetmobile terminal before a predetermined time has elapsed since the Readinformation was sent in S50 (NO in S55), the CPU 32 returns to themonitorings of S5 and S45.

S57 is same as S10. In S60, the CPU 32 executes automated G/O processing(see FIG. 4). The automated G/O processing is processing executed in thecase where the Write information is received from the target mobileterminal.

(Device Processing: FIG. 3)

Next, details of the device processing executed in S20 of FIG. 2 will bedescribed with reference to FIG. 3. In an initial state of FIG. 3, theoperation state of the MFP 10 is the device state, and the Wi-Fi I/F 20is repeating the executions of the Listen process and the Search processalternately.

S145 is same as S45 of FIGS. 2. S150 and S155, which are executed in acase of YES in S145, are same as S50 and S55 of FIG. 2. The CPU 32proceeds to S160 in a case of receiving Write information from thetarget mobile terminal (YES in S155), or returns to S145 in a case ofnot receiving Write information from the target mobile terminal (NO inS155). S160 is same as S60 of FIG. 2 (i.e., the processing of FIG. 4).

As aforementioned, since the Wi-Fi I/F 20 is executing the Listenprocess, in response to receiving a Probe request sent by broadcast froma mobile terminal, the Wi-Fi I/F 20 sends a Probe response to the mobileterminal. Hereafter, the mobile terminal that is the sender of the Proberequest will be termed “specific mobile terminal”. The Probe responseincludes the MAC address “A” of the MFP 10. After this, the Wi-Fi I/F 20resends a Probe response to the specific mobile terminal in a case ofreceiving a Probe request including the MAC address “A” from thespecific mobile terminal. In this case, the Wi-Fi I/F 20 executes, withthe specific mobile terminal, receipt of a Service Discovery request,sending of a response thereto, receipt of a Provision Discovery request,and sending of a response thereto. Next, the Wi-Fi I/F 20 receives a G/ONegotiation request from the specific mobile terminal. The G/ONegotiation request is a command for requesting execution of a G/ONegotiation, which is a communication for determining which one of theMFP 10 and the specific mobile terminal is to become the G/O. In S165,the CPU 32 monitors whether the G/O Negotiation request is received fromthe specific mobile terminal via the Wi-Fi I/F 20. In a case ofreceiving the G/O Negotiation request (YES in S165), the CPU 32 proceedsto S170.

In S170, the CPU 32 displays an inquiry screen on the display unit 14.The inquiry screen is a screen for inquiring the user whether or not aWFD connection with the specific mobile terminal is to be established.The inquiry screen includes a YES button indicating that the WFDconnection is to be established.

In S175, the CPU 32 determines whether or not the YES button in theinquiry screen has been operated. The CPU 32 determines YES in S175 in acase where the YES button is operated, and proceeds to S180. On theother hand, the CPU 32 determines NO in S175 in a case where the YESbutton is not operated, that is, in a case where a button indicatingthat the WFD connection is not to be established is selected, andreturns to the monitorings of S145 and S165. Due to this, a WFDconnection which the user does not intend can be suppressed from beingestablished.

In S180, the CPU 32 executes a WFD connection process for establishing aWFD connection with the specific mobile terminal. Specifically, the CPU32 supplies an WFD connection establishing instruction to the Wi-Fi I/F20. Due to this, the Wi-Fi I/F 20 executes the G/O Negotiation bysending a G/O Negotiation response to the specific mobile terminal, anddetermines which one of the MFP 10 and the specific mobile terminal isto become the G/O. The Wi-Fi I/F 20 further executes communications ofvarious signals (WSC Exchange, Authentication, Association, 4-wayhandshake, etc.) with the specific mobile terminal.

For example, in a case where the specific mobile terminal is determinedto become the G/O in the G/O Negotiation, the CPU 32 receives, from thespecific mobile terminal via the Wi-Fi I/F 20, an SSID and a password tobe used in a WFD network in which the specific mobile terminal operatesas the G/O in the WSC Exchange communication according to the PBC schemeof the WPS. In this case, the Wi-Fi I/F 20 further sends the receivedSSID and password to the specific mobile terminal in a course ofexecuting the communications of Authentication, Association, and 4-wayhandshake with the specific mobile terminal. Then, an authentication ofthe SSID and the password succeeds in the specific mobile terminal, as aresult of which the CPU 32 establishes a WFD connection with thespecific mobile terminal and participates as a client of the WFD schemein the WFD network in which the specific mobile terminal operates as theG/O.

Further, for example, in a case where the MFP 10 is determined to becomethe G/O in the G/O Negotiation, the CPU 32 sends an SSID and a passwordstored in the memory 34 to the specific mobile terminal via the Wi-FiI/F 20 in the WSC Exchange communication. The Wi-Fi I/F 20 furtherreceives the SSID and the password from the specific mobile terminal inthe course of executing the communications of Authentication,Association, and 4-way handshake with the specific mobile terminal. Anauthentication of the received SSID and password is executed, and whenthis authentication succeeds, the CPU 32 establishes a WFD connectionwith the specific mobile terminal to cause the specific mobile terminalto participate as a client of the WFD scheme in the WFD network in whichthe MFP 10 operates as the G/O.

(Automated G/O Processing: FIG. 4)

Next, details of the automated G/O processing executed in S60 of FIGS. 2and S160 of FIG. 3 will be described with reference to FIG. 4.

In S200, the CPU 32 starts a G/O shifting process. Specifically, the CPU32 supplies a G/O starting instruction for starting an operation as theG/O (for example, sending a beacon signal for checking presence of achild station) to the Wi-Fi I/F 20. Due to this, the Wi-Fi I/F 20attempts to start the operation, however, it takes about 1 to 2 secondsbefore completion of this operation. That is, at the time of S200, theoperation state of the MFP 10 is not yet the G/O state.

In S205, the CPU 32 determines whether or not the Write informationreceived in S55 of FIG. 2 or S155 of FIG. 3 includes the PBCinformation. In a case of determining that the Write informationincludes the PBC information, that is, in a case of determining that thetarget mobile terminal is the WFD device, the CPU 32 determines YES inS205 and proceeds to S210. In a case of determining that the Writeinformation does not include the PBC information, that is, in a case ofdetermining that the target mobile terminal is the Legacy device, theCPU 32 determines NO in S205 and proceeds to S225.

In S210, the CPU 32 supplies a prohibition instruction for prohibitingthe Listen process to the Wi-Fi I/F 20. Specifically, for example, inS210 in the automated G/O processing of S60 of FIG. 2, the CPU 32supplies the LS starting instruction to the Wi-Fi I/F 20 similarly toS15 of FIG. 2. However, the LS starting instruction herein includes aninstruction to set zero as the duration of the Listen process (i.e., theprohibition instruction), and an instruction to set a value greater thanzero as the duration of the Search process. Due to this, the Wi-Fi I/F20 executes only the Search process without executing the Listen processaccording to the instructions included in the LS starting instruction.Further, for example, when S210 in the automated G/O processing of S160of FIG. 3 is executed, the Wi-Fi I/F 20 has already started executingthe Listen process and the Search process. In this case, the CPU 32supplies the setting instruction to set zero as the duration of theListen process (i.e., the prohibition instruction) to the Wi-Fi I/F 20.Due to this, the Wi-Fi I/F 20 changes the duration of the Listen processto zero according to this setting instruction. That is, the Wi-Fi I/F 20stops the Listen process and executes only the Search process.

As aforementioned, in the present embodiment, since the CPU 32 suppliesthe instruction for setting zero as the duration of the Listen processto the Wi-Fi I/F 20, the Wi-Fi I/F 20 does not receive a Probe request.Instead of this, a configuration of a comparative example may beconsidered in which the CPU 32 supplies an instruction for setting avalue greater than zero as the duration of the Listen process to theWi-Fi I/F 20, and further supplies an instruction for ignoring a Proberequest even when received, to the Wi-Fi I/F 20. In this case, the Wi-FiI/F 20 receives the Probe request but does not send a Probe response, asa result of which the Listen process is prohibited. However, in theconfiguration of the comparative example, since the special instructionfor ignoring the Probe request is supplied to the Wi-Fi I/F 20, theWi-Fi I/F 20 must be programmed to execute an operation according tosuch an instruction. Contrary to this, the Wi-Fi I/F 20 supporting theWFD scheme is normally capable of executing the operation according tothe instruction for setting the duration of the Listen process.According to the present embodiment, the Listen process is prohibitedusing such a normal instruction, and thus the Listen process can beprohibited easily as compared to the configuration of the comparativeexample. In a variant, the configuration of the aforementionedcomparative example may be employed.

In S215, the CPU 32 monitors whether the G/O shifting process has beencompleted. Specifically, the CPU 32 determines YES in S215 and proceedsto S220 in a case of acquiring, from the Wi-Fi I/F 20, information thatindicates the operation as the G/O (such as sending the beacon signalfor checking presence of a child station) has started. When theoperation as the G/O is started, the Wi-Fi I/F 20 stops the Searchprocess, and further starts a response process of sending a Proberesponse in response to receiving a Probe request. The response processis a process similar to the Listen process, however, in the WFDspecification, the Listen process is defined as a process executed inthe device state. Thus, in the present embodiment, the process ofsending the Probe response after the G/O shifting process has beencompleted in S215 will be termed the response process, instead ofcalling it the Listen process.

In S220, the CPU 32 executes the WFD connection process for establishinga WFD connection with the target mobile terminal. Specifically, the CPU32 supplies a WFD connection establishing instruction to the Wi-Fi I/F20. Due to this, in response to receiving a Probe request sent bybroadcast from the target mobile terminal, the Wi-Fi I/F 20 sends aProbe response including the MAC address “A” and the same SSID as thatin S50 of FIG. 2 or S150 of FIG. 3 to the target mobile terminal. Next,the Wi-Fi I/F 20 sends a Probe response to the target mobile terminal inresponse to receiving a Probe request including the MAC address “A”(i.e., Probe request sent by unicast) from the target mobile terminal.The Wi-Fi I/F 20 further executes communications of various signals(Service Discovery, Provision Discovery, WSC Exchange, Authentication,Association, 4-way handshake, etc.) with the target mobile terminal. TheCPU 32 sends, to the target mobile terminal, the SSID and the passwordthat are same as the SSID and the password sent in S50 of FIG. 2 or S150of FIG. 3 in the WSC Exchange communication. Then, the CPU 32 receivesthe SSID and the password sent by the WSC Exchange from the targetmobile terminal in the course of the aforementioned communications ofthe various signals. An authentication of the received SSID and passwordis executed, and when this authentication succeeds, the CPU 32establishes a WFD connection with the target mobile terminal. Due tothis, the CPU 32 can cause the target mobile terminal to participate asa client in the WFD network in which the MFP 10 operates as the G/O.

On the other hand, in the case where the target mobile terminal is theLegacy device (NO in S205), the CPU 32 proceeds to S225. In S225 in theautomated G/O processing of S60 of FIG. 2, the CPU 32 supplies the LSstarting instruction to the Wi-Fi I/F 20 similarly to S15 of FIG. 2.Further, when S225 in the automated G/O processing of S160 of FIG. 3 isexecuted, S225 is skipped since the Wi-Fi I/F 20 has already startedexecuting the Listen process and the Search process.

S230 is same as S215, and the CPU 32 proceeds to S235 in a case of YESin S230. In S235, the CPU 32 executes a Legacy connection process forestablishing a Legacy connection with the target mobile terminal.Specifically, the CPU 32 supplies a Legacy connection establishinginstruction to the Wi-Fi I/F 20. Due to this, the Wi-Fi I/F 20 sends aProbe response to the target mobile terminal in response to receiving aProbe request including the SSID same as that in S50 of FIG. 2 or S150of FIG. 3 (i.e., Probe request sent by unicast) from the target mobileterminal. Since the target mobile terminal had already received the SSIDand the password in S50 of FIG. 2 or S150 of FIG. 3, it can send theaforementioned Probe request including this SSID to the MFP 10. TheWi-Fi I/F 20 further executes communications of various signals(Authentication, Association, 4-way handshake, etc.) with the targetmobile terminal. That is, unlike S220, the CPU 32 does not execute theWSC Exchange. However, since the target mobile terminal had alreadyreceived the SSID and the password in S50 of FIG. 2 or S150 of FIG. 3,it is capable of acknowledging the SSID and the password even when theWSC Exchange is not executed. The CPU 32 receives the SSID and thepassword that are same as those in S50 of FIG. 2 or S150 of FIG. 3 fromthe target mobile terminal in the course of the aforementionedcommunications of the various signals. An authentication of the receivedSSID and password is executed, and when this authentication succeeds,the CPU 32 establishes a Legacy connection with the target mobileterminal. Due to this, the CPU 32 can cause the target mobile terminalto participate as a legacy in the WFD network in which the MFP 10operates as the G/O.

As aforementioned, the CPU 32 can appropriately establish the WFDconnection or the Legacy connection with the target mobile terminal inS220 or S235. Especially, since the CPU 32 prohibits the Listen processin S210, the establishment of the WFD connection with the target mobileterminal can be suppressed from failing due to a Probe request beingsent. Further, in the case of receiving the Write information from thetarget mobile terminal, the CPU 32 establishes the WFD connection or theLegacy connection with the target mobile terminal without displaying theinquiry screen of S170 of FIG. 3. Since the user does not have toexecute an operation following the inquiry screen, user convenience canbe improved.

(Specific Cases: FIGS. 5 to 8)

Next, specific cases which are realized according to the processing ofFIGS. 2 to 4 will be described with reference to FIGS. 5 to 8. In FIGS.5 to 8, dashed arrows and solid arrows between the MFP 10 and therespective mobile terminals 100, 200, 300 indicate the NFC communicationand the Wi-Fi communication, respectively. Further, for easierunderstanding hereinbelow, operations executed by the CPUs 32, 132, andthe like of the respective devices 10, 100, 200, 300 will not bedescribed with the CPUs as the subject of action, but instead, will bedescribed with the devices (i.e., the MFP 10 and the respective mobileterminals 100, 200, 300) as the subject of action.

(Process of Case a, where NFC Connection is Established while WFDFunction is OFF: FIG. 5)

Firstly, with reference to FIG. 5, a case A where an NFC connection isestablished between the MFP 10 and the mobile terminal 100 in a statewhere the WFD function flag 38 of the MFP 10 is set to “OFF”, that is,in a state where the MFP 10 cannot execute an operation according to theWFD scheme will be described.

In T10, the user activates the MFP app 140 by using the operation unit112 of the mobile terminal 100, and brings the mobile terminal 100 closeto the MFP 10. Due to this, an NFC connection is established between theMFP 10 and the mobile terminal 100 in T12 (YES in S45 of FIG. 2).

In T20, the MFP 10 sends the Read information to the mobile terminal 100in response to receiving the Read command from the mobile terminal 100using the NFC connection (S50). This Read information includes the MACaddress “A”, an SSID “X”, and a password “P”.

In T30, the MFP 10 receives the Write information from the mobileterminal 100 (YES in S55). This Write information includes the G/Oshifting instruction and the PBC information. In T40, the MFP 10 changesthe WFD function flag 38 from “OFF” to “ON” (S57).

The MFP 10 executes the automated G/O processing in response toreceiving the Write information from the mobile terminal 100 (S60).Firstly, in T42, the MFP 10 starts the G/O shifting process (S200 ofFIG. 4). Further, since the received Write information includes the PBCinformation (YES in S205), the MFP 10 does not execute the Listenprocess but executes only the Search process in T44 (S210). Accordingly,the MFP 10 does not receive a Probe request sent by broadcast from themobile terminal 100 in T50. As a result of this, the MFP 10 does notsend a Probe response to the mobile terminal 100.

In T60, the MFP 10 completes the G/O shifting process and starts theoperation as the G/O (YES in S215). Due to this, in response toreceiving a Probe request, the MFP 10 can execute the response processof sending a Probe response. Thus, in response to receiving a Proberequest sent by broadcast from the mobile terminal 100 in T70, the MFP10 sends a Probe response to the mobile terminal 100 in T72 (S220). ThisProbe response includes the MAC address “A” and the SSID “X”.

The mobile terminal 100 receives a Probe response from each of one ormore devices including the MFP 10. In this case, the mobile terminal 100can acknowledge that the MFP 10, which is the connection target, ispresent by identifying the Probe response including the SSID “X”received in T20 from among the one or more Probe responses. Then, themobile terminal 100 sends, to the MFP 10, a Probe request including theMAC address “A” included in the Probe response, that is, a Probe requestincluding the MAC address “A” received in T20 as a destination (i.e.,Probe request sent by unicast).

In response to receiving the Probe request including the MAC address “A”from the mobile terminal 100 in T80, the MFP 10 sends a Probe responseto the mobile terminal 100 in T82 (S220). At this timing, the MFP 10 hasalready started the operation as the G/O in the WFD network in which theSSID “X” is used, and thus the Probe response includes not only the MACaddress “A” but also the SSID “X”. Due to this, the mobile terminal 100can be notified of the presence of the WFD network in which the SSID “X”is used, that is, the fact that the MFP 10 is operating as the G/O.

Next, in T90, the MFP 10 executes communications of various signals(Service Discovery, Provision Discovery, WSC Exchange, Authentication,Association, 4-way handshake, etc.) with the mobile terminal 100 (S220).Due to this, the MFP 10 establishes a WFD connection with the mobileterminal 100 to cause the mobile terminal 100 to participate as a clientin the WFD network in which the MFP 10 operates as the G/O. Although notshown in the drawings, the MFP 10 can execute a communication of targetdata (such as print data, scan data, etc.) with the mobile terminal 100using the WFD connection.

(Process of Case B, where NFC Connection is Established while WFDFunction is ON: FIG. 6)

Next, with reference to FIG. 6, a case B where an NFC connection isestablished between the MFP 10 and the mobile terminal 100 in a statewhere the WFD function flag 38 of the MFP 10 is set to “ON”, that is, ina state where the MFP 10 can execute the operation according to the WFDscheme will be described.

In T100, the user performs the WFD enabling operation on the MFP 10 (YESin S5 of FIG. 2). In this case, the MFP 10 changes the WFD function flag38 from “OFF” to “ON” in T102 (S10), and in T104, repeats executing theListen process and the Search process alternatively (S15). Due to this,the operation state of the MFP 10 shifts to the device state, and theMFP 10 executes the device processing (S20).

T10 to T30 of FIG. 6 are same as T10 to T30 of FIG. 5 (S145 to S155 ofFIG. 3). Further, T142 to T160 are same as T42 to T60 of FIG. 5.However, in T144, the MFP 10 stops the Listen process since it hasalready started executing the Listen process (S210 of FIG. 4). T70 toT90 of FIG. 6 are same as T70 to T90 of FIG. 5.

(Process of Case C, where Legacy Connection is Established: FIG. 7)

Next, with reference to FIG. 7, a case C where a Legacy connection isestablished between the MFP 10 and the mobile terminal 200 will bedescribed.

T210 to T230 are same as T10 to T30 of FIG. 5, except for that thecommunication counterpart is the mobile terminal 200 instead of themobile terminal 100, and that the PBC information is not included in theWrite information of T230 since the mobile terminal 200 is a Legacydevice.

The MFP 10 changes the WFD function flag 38 from “OFF” to “ON” (S57 ofFIG. 2) in T240, and starts the G/O shifting process (S200 of FIG. 4) inT242. Since the Write information of T230 does not include the PBCinformation (NO in S205), the MFP 10 starts both of the Listen processand the Search process (S225) in T244.

Since the MFP 10 is executing the Listen process, in response toreceiving a Probe response sent by broadcast from the mobile terminal200 in T250, the MFP 10 sends a Probe response to the mobile terminal200 in T252. This Probe response includes the MAC address “A”. At thistiming, since the MFP 10 has not yet started the operation as the G/O ofthe WFD network in which the SSID “X” is used, the Probe response doesnot include the SSID “X”.

The mobile terminal 200 receives a Probe response from each of one ormore devices including the MFP 10. In this case, the mobile terminal 200can acknowledge that the MFP 10, which is the connection target, ispresent by identifying the Probe response including the MAC address “A”received in T220 from among the one or more Probe responses. Asaforementioned, the mobile terminal 100, which is the WFD device, sendsthe Probe request including the MAC address “A” as the destination (T80of FIG. 5). Contrary to this, the mobile terminal 200, which is theLegacy device, sends a Probe request including the SSID “X” received inT220 (i.e., Probe request sent by unicast) to the MFP 10.

In T260, the MFP 10 receives the Probe request including the SSID “X”from the mobile terminal 200. However, at this timing, the MFP 10 hasnot yet started the operation as the G/O of the WFD network in which theSSID “X”, which was included in the Probe request, is used. Due to this,the MFP 10 does not send a Probe response to the mobile terminal 200.

T270 is same as T60 of FIG. 5. Since the MFP 10 has started theoperation as the G/O of the WFD network in which the SSID “X” is used,in response to receiving the Probe request including the SSID “X” againfrom the mobile terminal 200 in T280, the MFP 10 sends a Probe requestincluding the MAC address “A” and the SSID “X” to the mobile terminal200 in T282 (S235). Due to this, the mobile terminal 200 can be notifiedof the presence of the WFD network in which the SSID “X” is used, thatis, the fact that the MFP 10 is operating as the G/O.

Next, in T290, the MFP 10 executes communications of various signals(Authentication, Association, 4-way handshake, etc.) with the mobileterminal 200 (S235). Due to this, the MFP 10 establishes a Legacyconnection with the mobile terminal 200 to cause the mobile terminal 200to participate as a legacy in the WFD network in which the MFP 10operates as the G/O.

As shown in the case C, the MFP 10 does not prohibit the Listen processin the case where its counterpart with which the NFC connection isestablished is the mobile terminal 200 which is the Legacy device(T244). Although the MFP 10 does not prohibit the Listen process, itdoes not send a Probe response even when receiving the Probe requestincluding the SSID “X” as the destination from the mobile terminal 200in T260. Due to this, the establishment of the Legacy connection withthe mobile terminal 200 can be suppressed from failing due to a Proberesponse being sent. However, in a variant, the MFP 10 may prohibit theListen process in T244.

(Process of Case D, where Inquiry Screen is Displayed: FIG. 8)

Next, a case D where the MFP 10 operating in the device state, that is,the MFP 10 executing the device processing of S20 of FIG. 0.2 (i.e., theprocessing of FIG. 3) displays the inquiry screen in response toreceiving a G/O Negotiation request from the mobile terminal 100 will bedescribed. In an initial state of FIG. 8, since the operation state ofthe MFP 10 is the device state, the MFP 10 is executing the Listenprocess and the Search process.

T300 to T310 are same as T10 to T20 of FIG. 5, except for that thecommunication counterpart is the mobile terminal 300 instead of themobile terminal 100. Here, since the mobile terminal 300 does not storethe MFP app 140, the MFP 10 does not receive Write information from themobile terminal 300 (NO in S155 of FIG. 3). Accordingly, the operationstate of the MFP 10 remains as the device state, and thus the MFP 10does not establish a WFD connection with the mobile terminal 300.

In T320, the user executes, on the mobile terminal 100, a WFD devicesearch operation for searching a WFD device in a surrounding of themobile terminal 100. As a result, in T330, the mobile terminal 100 sendsa Probe request by broadcast.

In response to receiving the Probe request sent by broadcast from themobile terminal 100 in T330, the MFP 10 sends a Probe response to themobile terminal 100 in T332. This Probe response includes the MACaddress “A”. Although not shown, the Probe response further includes adevice name of the MFP 10.

The mobile terminal 100 receives a Probe response from each of one ormore devices including the MFP 10. The Probe response received from theMFP 10 includes the device name of the MFP 10. Further, for example, aProbe response received from an access point includes an SSID of awireless network formed by this access point. Although not shown, themobile terminal 100 displays one or more device names and/or SSIDsincluded in the one or more Probe responses, and accepts a selection ofthe device name of the MFP 10. In this case, the mobile terminal 100sends a Probe request including the MAC address “A” as the destination(i.e., Probe request sent by unicast) to the MFP 10.

In response to receiving the Probe request including the MAC address “A”from the mobile terminal 100 in T340, the MFP 10 sends a Probe responseincluding the MAC address “A” but not including an SSID to the mobileterminal 100 in T342. Due to this, the mobile terminal 100 can benotified that the MFP 10 is not operating as the G/O. Therefore, themobile terminal 100 can acknowledge that the G/O Negotiation is to beexecuted to establish a WFD connection with the MFP 10 being in thedevice state.

Next, in response to receiving a Service Discovery request from themobile terminal 100 in T350, the MFP 10 sends a Service Discoveryresponse to the mobile terminal 100 in T352. Then, in response toreceiving a Provision Discovery request from the mobile terminal 100 inT360, the MFP 10 sends a Provision Discovery response to the mobileterminal 100 in T362.

In T370, the MFP 10 receives a G/O Negotiation request from the mobileterminal 100 (YES in S165). In this case, in T380, the MFP 10 displaysthe inquiry screen on the display unit 14 (S170). The inquiry screenincludes the YES button indicating that a WFD connection is to beestablished, and a NO button indicating that a WFD connection is not tobe established.

In response to the YES button in the inquiry screen being selected bythe user in T382 (YES in S175), the MFP 10 sends a G/O Negotiationresponse to the mobile terminal 100 and executes the G/O Negotiationwith the mobile terminal 100 in T390 (S180). In this case, as a resultof the G/O Negotiation, the mobile terminal 100 is determined to becomethe G/O, and in T392, the mobile terminal 100 starts the operation asthe G/O.

In T394, the MFP 10 executes communications of various signals (WSCExchange, Authentication, Association, 4-way handshake etc.) with themobile terminal 100 (S180). As a result, the MFP 10 establishes a WFDconnection with the mobile terminal 100, and participates as a client ina WFD network in which the mobile terminal 100 operates as the G/O.

Comparative Example: FIG. 9

Next, a case where an MFP 10′ of the comparative example fails toestablish a WFD connection will be described with reference to FIG. 9.The MFP 10′ of the comparative example includes substantially the sameconfiguration as the MFP 10 of the present embodiment, however, it doesnot supply the prohibition instruction to its Wi-Fi I/F in S210 of FIG.4. That is, the MFP 10′ executes the Listen process during a period froma start of the G/O shifting process to an end thereof. Further, theWi-Fi I/F of the MFP 10′ is allocated with a MAC address “B”. Further,in a WFD network in which the MFP 10′ operates as the G/O, an SSID “Y”and a password “Q” are used.

T410 to T442 are same as T10 to T42 of FIG. 5 except for that the MACaddress “B”, the SSID “Y”, and the password “Q” are included in the Readinformation of T420. In T444, the MFP 10′ starts each of the Listenprocess and the Search process. As a result, during the period until theG/O shifting process is completed, in response to receiving a Proberequest sent by broadcast from the mobile terminal 100 in T450, the MFP10′ sends a Probe response including the MAC address “B” to the mobileterminal 100 in T452.

Next, in response to receiving a Probe request including the MAC address“B” from the mobile terminal 100 (i.e., Probe request sent by unicast)in T460, the MFP 10′ sends a Probe response to the mobile terminal 100in T462. At this timing, the MFP 10′ has not yet started the operationas the G/O of the WFD network in which the SSID “Y” is used. Thus, theProbe response includes the MAC address “B” but does not include theSSID “Y”. Due to this, the mobile terminal 100 can be notified that theMFP 10′ is not operating as the G/O. Due to this, the mobile terminal100 can acknowledge that the G/O Negotiation is to be executed toestablish a WFD connection with the MFP 10′ being in the device state.T470 to T482 thereafter are same as T350 to T362 of FIG. 8.

(Case E)

In a case E, the MFP 10′ completes the G/O shifting process in T490 andstarts the operation as the G/O. However, as aforementioned, since themobile terminal 100 operates to execute the G/O Negotiation, the MFP 10′receives a G/O Negotiation request from the mobile terminal 100 in T500.However, since the operation state of the MFP 10′ is the G/O state, theMFP 10′ does not send a G/O Negotiation response to the mobile terminal100. Thus, the processes following the WSC Exchange are not executed,and the establishment of a WFD connection between the MFP 10′ and themobile terminal 100 thereby fails.

(Case F)

A case F differs from the case E regarding a timing to complete the G/Oshifting process. The MFP 10′ receives a G/O Negotiation request fromthe mobile terminal 100 in T500 prior to completing the G/O shiftingprocess, and then in T502, it sends a G/O Negotiation response to themobile terminal 100 to execute the G/O Negotiation with the mobileterminal 100. In this case, as a result of the G/O Negotiation, themobile terminal 100 is determined to become the G/O. After this, inT510, the MFP 10′ completes the G/O shifting process, and starts theoperation as the G/O. Meanwhile, in T520, the mobile terminal 100 alsostarts the operation as the G/O according to the result of the G/ONegotiation. In this case, the WSC Exchange is not executed between theMFP 10′ and the mobile terminal 100. The reason therefor is as follows.Prior to the WSC Exchange, a device operating as a client sends a signalfor starting the WSC Exchange (e.g., a Probe request including WSCIE) toa device operating as the G/O. Under a situation where both the MFP 10′and the mobile terminal 100 are operating as the G/O, this signal is notcommunicated, as a result of which the WSC Exchange is not executed.Thus, the establishment of a WFD connection between the MFP 10′ and themobile terminal 100 thereby fails.

Effects of Embodiment

As mentioned above, some period of time (i.e., G/O shifting time (e.g.,1 to 2 seconds)) is needed in order for the MFP 10 to shift to the G/Ostate. As shown in the comparative example of FIG. 9, when thecommunication of the Probe response for establishing the WFD connectionbetween the MFP 10′ and the mobile terminal 100 (T462) is executed priorto the completion of the G/O shifting process, the establishment of theWFD connection between the MFP 10′ and the mobile terminal 100 fails.With respect to this, in the present embodiment, as shown in the cases Aand B in FIGS. 5 and 6, the MFP 10 prohibits the Listen process duringthe G/O shifting process (T44, T144). Accordingly, the sending of aProbe response is not executed before the completion of the shift of theMFP 10 to the G/O state. The establishment of the WFD connection can besuppressed from failing due to a Probe request being sent. Due to this,the MFP 10 can suitably establish the WFD connection with the mobileterminal 100, and can cause the mobile terminal 100 to participate as achild station in the WFD network in which the MFP 10 operates as theG/O.

Further, in the present embodiment, as shown in the case A of FIG. 5 tothe case C of FIG. 7, the MFP 10 shifts to the G/O state in the casewhere the NFC connection with the mobile terminal 100 is established andthe Write information is received from the mobile terminal 100 (or 200)in which the MFP app 140 has been installed. On the other hand, as shownin the case D of FIG. 8, the MFP 10 does not shift to the G/O state inthe case where the Write information is not received from the mobileterminal 300 even when the NFC connection is established with the mobileterminal 300. As above, the MFP 10 does not shift to the G/O state evenwhen the NFC connection is established with the mobile terminal 300 inwhich the MFP app 140 is not installed, that is, the mobile terminal 300which cannot establish a WFD connection. Thus, a processing load on theMFP 10 can be suppressed from increasing.

(Correspondence Relationships)

The MFP 10, the mobile terminal 100, and the mobile terminal 200 arerespectively an example of a “communication device”, “first externaldevice”, and “second external device”. The mobile terminal 300 and themobile terminal 100 in the case D of FIG. 8 are respectively an exampleof “first external device” and “third external device”. The NFC I/F 22and the Wi-Fi I/F 20 are respectively an example of “first wirelessinterface” and “second wireless interface”. The NFC connection in T12 ofFIGS. 5 and 6, the WFD connection established in T90 of FIGS. 5 and 6,the NFC connection in T212 of FIG. 7, the Legacy connection establishedin T290 of FIG. 7, and the WFD connection in T394 of FIG. 8 arerespectively an example of “first wireless connection”, “second wirelessconnection”, “third wireless connection”, “fourth wireless connection”,and “fifth wireless connection”.

S200 of FIG. 4 is an example of a process executed by “shift anoperation state of a communication device from a specific state to a G/Ostate in a case where a first wireless connection via the first wirelessinterface is established” and “shift the operation state of thecommunication device from the specific state to the G/O state in a casewhere a third wireless connection via the first wireless interface isestablished”. S220 and S235 are respectively an example of a processexecuted by “establish a second wireless connection” and “establish afourth wireless connection”.

The SSID “X” is an example of “identification information”. The Writeinformation and the PBC information are respectively an example of“predetermined information” and “WFD device information”. The MFPapplication 140 is an example of “application program”. The WSC Exchangeis an example of “password sending process”, and the password “P” sentby the MFP 10 in the WSC Exchange of T90 of FIG. 5 and the password “P”in the Read information of T220 of FIG. 7 are respectively an example of“first password” and “second password”. The G/O Negotiation request ofT370 of FIG. 8 is an example of “specific signal”.

(Variant 1) Each of the devices 10, 100, 200, 300 may be provided withan I/F for executing a wireless communication according to acommunication scheme different from the NFC scheme (e.g., infrared rayscheme, TransferJet (registered trademark) scheme, a BlueTooth(registered trademark) scheme) instead of the NFC I/F. That is, “firstcommunication interface” is not limited to the NFC I/F 22, and may be anI/F for executing a short-range wireless communication according toother communication scheme.

(Variant 2) The Read information in S50 of FIGS. 2 and S150 of FIG. 3may not include the SSID “X”. In this case as well, the mobile terminal100 can identify the Probe response including the received MAC address“A” in T80 of FIG. 5. In this variant, the MAC address “A” is an exampleof “identification information”.

(Variant 3) In the above embodiment, the MFP 10 is assumed to establishwireless connections with both the WFD device and the Legacy device,however, in a variant, the MFP 10 may be configured to establish awireless connection with only the WFD device. In this case, S205, S225to S235 of FIG. 4 may be omitted. Further, since the MFP 10 sends thepassword to the WFD device in the WSC Exchange in S220 of FIG. 4, theRead information not including the password may be sent in S50 of FIGS.2 and S150 of FIG. 3. In this variant, and “shift the operation state ofthe communication device from the specific state to the G/O state in acase where a third wireless connection via the first wireless interfaceis established” and “establish a fourth wireless connection with thesecond external device” may be omitted.

(Variant 4) The NFC I/F of each of the devices 10, 100, 200, 300 mayexecute a communication corresponding to the communications of the Readinformation and the Write information by operating in the P2P mode.

(Variant 5) S165 to S180 of FIG. 3 may not be executed. That is, “causethe display unit to display an inquiry screen” and “establish the fifthwireless connection with the third external device” may be omitted.

(Variant 6) In S165 of FIG. 3, the MFP 10 may monitor the ServiceDiscovery request or the Provision Discovery request instead of the G/ONegotiation request. In this variant, the Service Discovery request orthe Provision Discovery request is an example of “specific signal”.

(Variant 7) “Communication device” may not be an MFP, and it may beother device such as a printer, a scanner, a mobile terminal, a PC, aserver, and the like.

(Variant 8) In the respective embodiments as above, the processes ofFIGS. 2 to 8 are implemented by software (i.e., program 36), however, atleast one of these processes may be implemented by hardware such as alogic circuit.

What is claimed is:
 1. A communication device comprising: a firstwireless interface configured to execute a wireless communicationaccording to a Bluetooth (registered trademark) scheme; a secondwireless interface configured to execute a wireless communicationaccording to a Wi-Fi scheme; a processor; and a memory storingcomputer-readable instructions therein, the computer-readableinstructions, when executed by the processor, causing the communicationdevice to: shift an operation state of the communication device from aspecific state to a G/O (abbreviation of Group Owner) state of a WFD(abbreviation of Wi-Fi Direct (registered trademark)) scheme conformingto the Wi-Fi scheme, in a case where a first wireless connection via thefirst wireless interface is established with an external device under asituation where the operation state of the communication device is thespecific state, and predetermined information is received from theexternal device using the first wireless connection, the specific statebeing different from the G/O state, wherein the predeterminedinformation is sent from the external device in which a predeterminedapplication program has been installed; and in a case where theoperation state of the communication device shifts to the G/O state inresponse to receiving the predetermined information from the externaldevice, execute, via the second wireless interface, a predeterminedcommunication with the external device for causing the external deviceto participate in a wireless network formed by the communication device.2. The communication device as in claim 1, wherein the predeterminedinformation includes WFD device information indicating that the externaldevice is a WFD device which supports the WFD scheme.
 3. Thecommunication device as in claim 2, wherein the predeterminedcommunication with the external device is for causing the externaldevice to participate as a client of the WFD scheme in the wirelessnetwork in which the communication device operates as a G/O of the WFDscheme.
 4. The communication device as in claim 1, wherein thepredetermined communication with the external device is for causing theexternal device to participate as a client of the WFD scheme in thewireless network in which the communication device operates as a G/O ofthe WFD scheme.
 5. The communication device as in claim 1, wherein thepredetermined information does not include WFD device informationindicating that the external device is a WFD device which supports theWFD scheme.
 6. The communication device as in claim 5, wherein thepredetermined communication with the external device is for causing theexternal device to participate as a Legacy of the Wi-Fi scheme in thewireless network.
 7. The communication device as in claim 1, wherein thepredetermined communication with the external device is for causing theexternal device to participate as a Legacy of the Wi-Fi scheme in thewireless network in which the communication device operates as a G/O. 8.The communication device as in claim 1, wherein the predeterminedcommunication with the external device is for causing the externaldevice to participate as a Legacy of the Wi-Fi scheme in the wirelessnetwork.
 9. The communication device as in claim 7, wherein thepredetermined communication includes that the communication devicereceives a Service Set Identifier (SSID) from the external device. 10.The communication device as in claim 9, wherein the predeterminedcommunication includes that the communication device receives a passwordfrom the external device.
 11. The communication device as in claim 1,wherein the communication device is at least one of a printer and ascanner.
 12. The communication device as in claim 1, wherein thecommunication device is a multi-function peripheral capable of executingmultiple functions including a print function and a scan function.
 13. Anon-transitory computer-readable recording medium storingcomputer-readable instructions for a communication device, wherein thecommunication device comprises: a first wireless interface configured toexecute a wireless communication according to a Bluetooth (registeredtrademark) scheme; and a second wireless interface configured to executea wireless communication according to a Wi-Fi scheme, and wherein thecomputer-readable instructions, when executed by a processor of thecommunication device, cause the communication device to: shift anoperation state of the communication device from a specific state to aG/O (abbreviation of Group Owner) state of a WFD (abbreviation of Wi-FiDirect (registered trademark)) scheme conforming to the Wi-Fi scheme, ina case where a first wireless connection via the first wirelessinterface is established with an external device under a situation wherethe operation state of the communication device is the specific state,and predetermined information is received from the external device usingthe first wireless connection, the specific state being different fromthe G/O state, wherein the predetermined information is sent from theexternal device in which a predetermined application program has beeninstalled; and in a case where the operation state of the communicationdevice shifts to the G/O state in response to receiving thepredetermined information from the external device, execute, via thesecond wireless interface, a predetermined communication with theexternal device for causing the external device to participate in awireless network formed by the communication device.
 14. Thenon-transitory computer-readable recording medium as in claim 13,wherein the predetermined information does not include WFD deviceinformation indicating that the external device is a WFD device whichsupports the WFD scheme.
 15. The non-transitory computer-readablerecording medium as in claim 14, wherein the predetermined communicationwith the external device is for causing the external device toparticipate as a Legacy of the Wi-Fi scheme in the wireless network. 16.The non-transitory computer-readable recording medium as in claim 13,wherein the predetermined communication with the external device is forcausing the external device to participate as a Legacy of the Wi-Fischeme in the wireless network in which the communication deviceoperates as a G/O.
 17. A method executed by a communication device,wherein the communication device comprises: a first wireless interfaceconfigured to execute a wireless communication according to a Bluetooth(registered trademark) scheme; and a second wireless interfaceconfigured to execute a wireless communication according to a Wi-Fischeme, and wherein the method comprises: shifting an operation state ofthe communication device from a specific state to a G/O (abbreviation ofGroup Owner) state of a WFD (abbreviation of Wi-Fi Direct (registeredtrademark)) scheme conforming to the Wi-Fi scheme, in a case where afirst wireless connection via the first wireless interface isestablished with an external device under a situation where theoperation state of the communication device is the specific state, andpredetermined information is received from the external device using thefirst wireless connection, the specific state being different from theG/O state, wherein the predetermined information is sent from theexternal device in which a predetermined application program has beeninstalled; and in a case where the operation state of the communicationdevice shifts to the G/O state in response to receiving thepredetermined information from the external device, executing, via thesecond wireless interface, a predetermined communication with theexternal device for causing the external device to participate in awireless network formed by the communication device.
 18. The method asin claim 17, wherein the predetermined information does not include WFDdevice information indicating that the external device is a WFD devicewhich supports the WFD scheme.
 19. The method as in claim 18, whereinthe predetermined communication with the external device is for causingthe external device to participate as a Legacy of the Wi-Fi scheme inthe wireless network.
 20. The method as in claim 19, wherein thepredetermined communication with the external device is for causing theexternal device to participate as a Legacy of the Wi-Fi scheme in thewireless network in which the communication device operates as a G/O.